<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>LOGIN</title>
    <meta name="description" content="particles.js is a lightweight JavaScript library for creating particles.">
    <meta name="author" content="Vincent Garreau"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" media="screen" th:href="@{/css/register.css}" />
</head>
<body>
<!-- particles.js container -->
<div id="particles-js" style="display: flex; align-items: center; justify-content: center;"></div>

<!-- 登录页面容器 -->
<div class="login-container">
    <div class="login-page">
        <div class="login-content">
            <div class="login-tit">LOGIN</div>
            <form th:action="@{/user/login}" method="post" id="login-form">
                <div class="login-input">
                    <label>
                        <input type="text" placeholder="account" name="username">
                    </label>
                </div>
                <div class="login-input">
                    <label>
                        <input type="password" placeholder="password" name="pwd">
                    </label>
                </div>
                <div class="login-btn">
                    <div class="login-btn-left">
                        <span onclick="submit()">LOGIN</span>
                    </div>
                </div>
                <!-- 添加注册按钮 -->
                <div class="register-btn">
                    <a href="/register" class="btn-register">REGISTER</a>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- scripts -->
<script th:src="@{/js/particles.js}"></script>
<script th:src="@{/js/app.js}"></script>
<script>
    function submit() {
        let form = document.getElementById("login-form");
        form.submit();
    }
</script>
</body>
</html>



